<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>文件详情</title>
    <%@ include file="/WEB-INF/common/header.jsp" %>
</head>
<body>
<div class="page-content d-flex align-items-stretch">
    <%@ include file="/WEB-INF/common/navbar.jsp" %>
    <%@ include file="/WEB-INF/common/menu.jsp" %>

    <!-- 内容主体区域 -->
    <div  class="content-inner">
        <div align="center">
            <a href="${ctx}/teacher/t-showdetailFile">返回</a><br><br>
        </div>
        <div align="left">
            <c:choose>
                <c:when test="${fileItem.suffixName eq 'jpg'}">
                    <img src="${ctx}/uploads/${fileItem.prefixName}" id="image">
                    <table>
                        <tr>
                            <td><span style="font-weight: bold;color: #0000FF">文件标题：</span></td>
                            <td>${fileItem.fileName}</td>
                        </tr>
                        <tr>
                            <td><span style="font-weight: bold;color: #0000FF">文件大小：</span></td>
                            <td><span style="color: red">${fileItem.fileSize}</span> KB</td>
                        </tr>
                        <tr>
                            <td><span style="font-weight: bold;color: #0000FF">文件类型：</span></td>
                            <td><span style="color: red">${fileItem.suffixName}</span> 格式</td>
                        </tr>
                        <tr>
                            <td><span style="font-weight: bold;color: #0000FF">下载次数：</span></td>
                            <td><span style="color: red">${fileItem.downloadCount}</span> 人次</td>
                        </tr>
                        <tr>
                            <td><span style="font-weight: bold;color: #0000FF">上传时间：</span></td>
                            <td>${fileItem.uploadTime} </td>
                        </tr>
                    </table>
                </c:when>
                <c:otherwise>
                    <table>
                        <tr>
                            <td><span style="font-weight: bold;color: #0000FF">文件标题：</span></td>
                            <td>${fileItem.fileName}</td>
                        </tr>
                        <tr>
                            <td><span style="font-weight: bold;color: #0000FF">文件大小：</span></td>
                            <td><span style="color: red">${fileItem.fileSize}</span> KB</td>
                        </tr>
                        <tr>
                            <td><span style="font-weight: bold;color: #0000FF">文件类型：</span></td>
                            <td><span style="color: red">${fileItem.suffixName}</span> 格式</td>
                        </tr>
                        <tr>
                            <td><span style="font-weight: bold;color: #0000FF">下载次数：</span></td>
                            <td><span style="color: red">${fileItem.downloadCount}</span> 人次</td>
                        </tr>
                        <tr>
                            <td><span style="font-weight: bold;color: #0000FF">上传时间：</span></td>
                            <td>${fileItem.uploadTime} </td>
                        </tr>
                    </table>

                </c:otherwise>
            </c:choose>

        </div>
    </div>


</div>

<%@ include file="/WEB-INF/common/footer.jsp"%>
</body>
</html>
